/**
 * 
 */
package facade.client;

import org.timepedia.exporter.client.Export;
import org.timepedia.exporter.client.ExportClosure;
import org.timepedia.exporter.client.ExportConstructor;
import org.timepedia.exporter.client.ExportOverlay;
import org.timepedia.exporter.client.ExportPackage;

import traer.physics.Attraction;
import traer.physics.Particle;
import traer.physics.ParticleSystem;
import traer.physics.Spring;
import traer.physics.Vector3D;

/**
 * @author cesar
 *
 */
public  class ExporterFacade {
	
	
	@ExportPackage("TraerPhysics")
	@Export("ParticleSystem")	
	public static abstract  class ParticleSystemFacade implements ExportOverlay<ParticleSystem>   {
		
		
	    @ExportConstructor
		public static ParticleSystem constructor( float g, float somedrag ){
			return new ParticleSystem(g, somedrag);
		}
		public abstract Particle makeParticle( float mass, float x, float y, float z );
		public abstract Spring makeSpring( Particle a, Particle b, float ks, float d, float r );
		public abstract void tick();
		public abstract void clear();
		public abstract Particle getParticle( int i );		
		public abstract  Attraction removeAttraction( int i  );
		//////////////////////////////////////////////////////////////////////////////////////////
		public abstract int makeAttraction2( Particle a, Particle b, float k, float minDistance );
		public abstract int makeParticle2( float mass, float x, float y, float z );
		public abstract void replaceAttraction( int i, Attraction m );
		public abstract void       removeParticle( int i )  ;
			
	}
	

	
	@ExportPackage("TraerPhysics")
	@Export("Vector3D")
	@ExportClosure()
	public abstract class Vector3DFacade implements ExportOverlay<Vector3D>   {
		
		public abstract float x();
		public abstract float y();
		public abstract void set( float X, float Y, float Z );
			
	}		
	
	@ExportPackage("TraerPhysics")
	@Export("Particle")
	@ExportClosure()
	public abstract static class ParticleFacade implements ExportOverlay<Particle>   {
		
		
	    @ExportConstructor
		public static Particle constructor(float m ){
			return new Particle(m);
		}	
		
		public abstract void makeFixed();
		public abstract void makeFree();
		public abstract Vector3D position();
			
	}	
	
	@ExportPackage("TraerPhysics")
	@Export("Attraction")
	@ExportClosure()
	public abstract static class AttractionFacade implements ExportOverlay<Attraction>   {
		
	    @ExportConstructor
		public static Attraction constructor( Particle a, Particle b, float k, float distanceMin  ){
			return new Attraction(  a,  b,  k,  distanceMin );
		}	
					
	}		
		

}
